#pragma once
#include<unordered_map>
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <Image.h>

class Resource{
private:
    Resource() = default;
    ~Resource() = default;
    std::unordered_map<std::string,Image*> images_map;
    static Resource* instance;
    char resourcepath[BUFSIZ]={};
public:
    static Resource* getInstance();
    void quit();
    void loadImage(const char* name,const char* imgpath, ImageDirect imgdirect = ImageDirect::UP);
    void setPath(const char* path);
    Image* getImage(std::string name);
    
};